tar xf nginx-1.9.15.tar.gz
cd nginx-1.9.15
./configure --user=nginx --group=nginx --prefix=/application/nginx1.9.15 --with-http_stub_status_module --with-http_ssl_module
make && make install
ln -s /application/nginx1.9.15/ /application/nginx
/application/nginx/sbin/nginx
mysql-5.5.32-linux2.6-x86_64.tar.gz 二进制方式安装
useradd mysql -s /sbin/nologin -M
tar xf mysql-5.5.32-linux2.6-x86_64.tar.gz
mv mysql-5.5.32-linux2.6-x86_64 /application/mysql
cd /application/mysql/
chown -R mysql.mysql /application/mysql/data/
./scripts/mysql_install_db --user=mysql --basedir=/application/mysql/ --datadir=/application/mysql/data/
cp support-files/mysql.server /etc/init.d/mysqld
vim /etc/init.d/mysqld
basedir=/application/mysql
datadir=/application/mysql/data
cp support-files/my-small.cnf /etc/my.cnf
/etc/init.d/mysqld start
ln -s /application/mysql/bin/mysql /usr/local/bin/
mysql
./mysqladmin -u root password "123456"
mysql -uroot -p123456
vim /etc/profile
PATH=/application/mysql/bin:$PATH
. /etc/profile
data]# cat bogon.err 看报错
show databases;
drop database test;
mysql> select user,host from mysql.user;
+------+-----------+
| user | host |
+------+-----------+
| root | 127.0.0.1 |
| root | ::1 |
| | bogon |
| root | bogon |
| | localhost |
| root | localhost |
+------+-----------+
6 rows in set (0.00 sec)
delete from mysql.user where user='hequan' and host='123456';
drop user 'root'@'bogon' ;
+------+-----------+
| user | host |
+------+-----------+
| root | 127.0.0.1 |
| root | localhost |
+------+-----------+
2 rows in set (0.00 sec)
netstat -lntup | egrep "nginx|mysql"
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1681/nginx
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 5236/mysqld
tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make
make install
cd ../
/sbin/ldconfig
tar zxf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
cd ../../
tar -zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9
./configure
make
make install
安装mcrypt
tar -zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
/sbin/ldconfig
./configure LD_LIBRARY_PATH=/usr/local/lib
make
make install
tar xf php-5.3.27.tar.gz
cd php-5.3.27
./configure \
--prefix=/application/php5.3.27 \
--with-mysql=/application/mysql \
--with-xmlrpc \
--with-openssl \
--with-zlib \
--with-freetype-dir \
--with-gd \
--with-jpeg-dir \
--with-mhash \
--enable-pcntl \
--with-png-dir \
--with-iconv=/usr/local/libiconv \
--enable-xml \
--disable-rpath \
--enable-safe-mode \
--enable-bcmath \
--enable-shmop \
--enable-inline-optimization \
--enable-fpm \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--enable-short-tags \
--enable-sockets \
--enable-zend-multibyte \
--enable-soap \
--enable-mbstring \
--enable-static \
--enable-gd-native-ttf \
--with-curl \
--with-curlwrappers \
--with-xsl \
--enable-ftp \
--enable-zip \
--with-libxml-dir=/usr
Thank you for using PHP.
/hequan/php-5.3.27/sapi/cli/php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
make: *** [ext/phar/phar.php] 错误 127