wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz
cd /opt
tar -zxf pcre-8.10.tar.gz
cd pcre-8.10
./configure
make && make install
yum -y install openssl openssl-devel
cd /opt
tar -zxf nginx-1.0.4.tar.gz
cd nginx-1.0.4
./configure --user=www --group=www --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
chkconfig --add mysql
service mysql start
/usr/local/webserver/mysql/bin/mysql
#设置本地及远程数据库root登录密码
mysql> grant all on *.* to 'root'@'localhost' identified by '123456';
mysql> grant all on *.* to 'root'@'%' identified by '123456';
Mysql 安装成功
如果出现'@HOSTNAME@' command not found 可以修改脚本来对应.pid文件
##############################################################################################################
Linux下MySql的卸载
源码安装的卸载方法:
到源码目录,如果可以运行make uninstall就可以卸载。如果没有,就直接删除。
如果是./configure –prefix指定了目录用 rm -rf 目录名 删除
————————————————————-
[iyunv@localhost ~]# cd /usr/local/src/mysql-5.1.45
[iyunv@localhost mysql-5.1.45]# make uninstall
[iyunv@localhost mysql-5.1.45]# cd ..
[iyunv@localhost src]# rm -rf mysql-5.1.45
[iyunv@localhost src]# cd ..
[iyunv@localhost local]# ls
bin etc games include lib libexec [...]
删除所有应用目录
转载请注明出处:http://blog.sina.com.cn/egoservice
更新yum
*****************************************************************************
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.old
touch CentOS-Base.repo
vi CentOS-Base.repo
-------------------------------------------------------------------------------------------
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
http://centos.candishosting.com.cn/$releaserver/os/basearch/
http://centos.ustc.edu.cn/centos/$releasever/os/$basearch/
http://ftp.sjtu.edu.cn/centos/$releasever/os/$basearch/
http://mirrors.ta139.com/centos/$releasever/os/$basearch/
http://mirror.be10.com/centos/$releasever/os/$basearch/
http://ftp.hostrino.com/pub/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
http://centos.candishosting.com.cn/$releaserver/updates/basearch/
http://centos.ustc.edu.cn/centos/$releasever/updates/$basearch/
http://ftp.sjtu.edu.cn/centos/$releasever/updates/$basearch/
http://mirrors.ta139.com/centos/$releasever/updates/$basearch/
http://mirror.be10.com/centos/$releasever/updates/$basearch/
http://ftp.hostrino.com/pub/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
http://centos.candishosting.com.cn/$releaserver/addons/basearch/
http://centos.ustc.edu.cn/centos/$releasever/addons/$basearch/
http://ftp.sjtu.edu.cn/centos/$releasever/addons/$basearch/
http://mirrors.ta139.com/centos/$releasever/addons/$basearch/
http://mirror.be10.com/centos/$releasever/addons/$basearch/
http://ftp.hostrino.com/pub/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
http://centos.candishosting.com.cn/$releaserver/extras/basearch/
http://centos.ustc.edu.cn/centos/$releasever/extras/$basearch/
http://ftp.sjtu.edu.cn/centos/$releasever/extras/$basearch/
http://mirrors.ta139.com/centos/$releasever/extras/$basearch/
http://mirror.be10.com/centos/$releasever/extras/$basearch/
http://ftp.hostrino.com/pub/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
http://centos.candishosting.com.cn/$releaserver/centosplus/basearch/
http://centos.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
http://ftp.sjtu.edu.cn/centos/$releasever/centosplus/$basearch/
http://mirrors.ta139.com/centos/$releasever/centosplus/$basearch/
http://mirror.be10.com/centos/$releasever/centosplus/$basearch/
http://ftp.hostrino.com/pub/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
--------------------------------------------------------------------------------------------
service yum restart (重启yum)
yum check-update 检查更新
转载请注明出处:http://blog.sina.com.cn/egoservice