make
make install
/opt/app/nginx/sbin/nginx -t
nginx: the configuration file /opt/app/nginx//conf/nginx.conf syntax is ok
nginx: configuration file /opt/app/nginx//conf/nginx.conf test is successful
mkdir /opt/mysql/data
chown -R mysql.mysql /opt/app/mysql/
tar xzf mysql-5.5.34.tar.gz && cd mysql*
make
make install
mkdir /opt/app/mysql/log
mkdir /opt/app/mysql/etc
cp support-files/my-medium.cnf /opt/app/mysql/etc/my.cnf
chmod 755 scripts/mysql_install_db
scripts/mysql_install_db --user=mysql --basedir=/opt/app/mysql/ --datadir=/opt/app/mysql/data/
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
Alternatively you can run:
/opt/app/mysql//bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /opt/app/mysql/ ; /opt/app/mysql//bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /opt/app/mysql//mysql-test ; perl mysql-test-run.pl
Please report any problems with the /opt/app/mysql//scripts/mysqlbug script!
mkdir /opt/mysql/init.d
mkdir /opt/app/mysql/init.d
cp support-files/mysql.server /opt/app/mysql/init.d/mysql
chmod a+x /opt/app/mysql/init.d/mysql
/opt/mysql/init.d/mysql start
启动报错StartingMySQL.. ERROR! The server quit without updating PID file (/var/lib/mysql/mysql.pid).解决办法: