yum -y install gcc gcc-c++ autoconf automake make
yum -y install pcre*
yum -y install openssl*
cd /usr/local/
#安装nginx
curl http://nginx.org/download/nginx-1.7.8.tar.gz >> ./nginx-1.7.8.tar.gz
tar -xvf nginx-1.7.8.tar.gz
mv nginx-1.7.8 nginx
cd nginx
./configure --prefix=/usr/local/nginx-1.7.8 \
--with-http_ssl_module --with-http_spdy_module \
--with-http_stub_status_module --with-pcre
make
make install
vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/nginx-1.7.8/sbin
source ~/.bash_profile
/usr/local/nginx-1.7.8/sbin/nginx
/usr/local/nginx-1.7.8/sbin/nginx -s reload
/usr/local/nginx-1.7.8/sbin/nginx -s stop
yum -y install libxml2 libxml2-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel curl curl-devel php-mcrypt libmcrypt libmcrypt-devel openssl-devel gd
#安装加解密扩展库,centos下会出现yum安装不上的情况,需要手动安装扩展
cd /usr/local/src
curl http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz >> ./libmcrypt-2.5.8.tar.gz
tar zxvf ./libmcrypt-2.5.8.tar.gz
cd cd libmcrypt-2.5.8
./configure
make
make install
#安装php5.4
cd /usr/local
curl http://cn.php.net/distributions/php-5.4.40.tar.gz >> ./php-5.4.40.tar.gz
tar -xvf ./php-5.4.40.tar.gz
mkdir /usr/local/php5.4
./configure --prefix=/usr/local/php5.4 --with-config-file-path=/usr/local/php5.4/etc --with-gd --with-iconv --with-zlib --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-pear --with-gettext --enable-session --with-mcrypt --with-curl --with-libxml-dir=/usr/lib64
make && make install
cp /usr/local/php-5.4.40/php.ini-production /usr/local/php5.4/lib/php.ini
cp /usr/local/php5.4/etc/php-fpm.conf.default /usr/local/php5.4/etc/php-fpm.conf
/usr/local/php5.4/sbin/php-fpm
ps axu |fgrep php-fpm
vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/nginx-1.7.8/sbin:/usr/local/php5.4/bin
source ~/.bash_profile
#安装mysql
#创建用户组
groupadd mysql
#创建用户
useradd -g mysql mysql
#安装cmake,mysql5.1以上需要使用cmake编译
yum install cmake ncurses-devel bison
cd /usr/local/
curl http://mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.50.tar.gz >> ./mysql-5.5.50.tar.gz
tar -xvf mysql-5.5.50.tar.gz
cd mysql-5.5.50
#设置mysql用户权限
chown -R mysql:mysql /usr/local/mysql5.5
mkdir /data/mysql/
chmod 777 /data/mysql/
#安装数据库
wget -O mysql5.5.tar.gz http://mirrors.sohu.com/mysql/MySQL-5.5//mysql-5.5.55-linux2.6-x86_64.tar.gz
tar -xvf mysql5.5.tar.gz
cd /usr/local/src/mysql-5.5.55 && cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5.5 -DMYSQL_DATADIR=/data/mysql5.5 -DSYSCONFDIR=/etc \
&& make && make install
#初始化数据库
cd /usr/local/mysql5.5/scripts
./mysql_install_db --user=mysql --basedir=/usr/local/mysql5.5 --datadir=/data/mysql/
vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/php5.4/bin:/usr/local/nginx-1.7.8/sbin:/usr/local/mysql5.5/bin
source ~/.bash_profile
lnmp环境安装详细
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 如果我们已经有使用过Linux VPS、服务器一段时间,个人还是建议不用WEB可视面板,虽然很方便而且功能很强大,...
- 对于初次接触 VPS 的童鞋来说,VPS 多多少少有点复杂,其实简单说可以把它当做一台真正的独立服务器,而且更为方...
- 说明: windows, 安装了docker和docker compose 特别注意: 安装成功后, 我发现项目连...
- Lnmp.org访问Laravel5.5 + 配置 1.首先说一下,Lnmp包里需要自己的是CentOS7.1.1...
- 要求说明: linux, 安装了docker和docker compose 安装: 直接执行命令即可! git c...