(Linux, ubuntu10.04) Installation Process:
Apt-get install cmake libncurses5-dev
Compile mysql5.5.23:
Cmake. -DINSTALL_DOCDIR =/usr/local/mysql/docs-DINSTALL_MANDIR =/usr/local/mysql/manual-DINSTALL_PLUGINDIR =/usr/local/mysql/plugin-DINSTALL_SUPPORTFILEFDIR =/usr/local /mysql/extra-files-DMYSQL_DATADIR =/usr/local/mysql/data-DSYSCONFDIR =/etc/my. cnf-DWITH_INNOBASE_STORAGE_ENGINE = 1
-Keys = 1-keys = 1-DDEFAULT_CHARSET = utf8-DENABLE_DEBUG_SYNC = 0-keys = 1-DENABLED_PROFILING = 1-DWITH_LIBWRAP = 1-DWITH_SSL = bundled-keys = 1-keys = 1
-DDEFAULT_COLLATION = utf8_general_ci
If-DDEFAULT_CHARSET is set by yourself, errors are easily indicated. During installation:
./Scripts/mysql_install_db -- user = mysql -- collation-server = utf8_general_ci
After installation, add collation-server = utf8_general_ci to/etc/my. cnf. Uncomment the settings of innodb.
These may be used: to prevent old object files or configuration information from being used, run these commands on UNIX before re-running cmake:
Shell> make clean
Shell> RM cmakecache.txt
Install the MySQL server:
Install libaio1 first (I don't know what it is)
To install and use a MySQL binary distribution, the basic command
Sequence looks like this:
Shell> groupadd MySQL
Shell> useradd-r-g MySQL
Shell> Cd/usr/local
Shell> tar zxvf/path/to/mysql-VERSION-OS.tar.gz
Shell> ln-s full-path-to-mysql-version-OS MySQL
Shell> Cd MySQL
Shell> chown-r MySQL.
Shell> chgrp-r MySQL.
Shell> scripts/mysql_install_db -- user = MySQL
Shell> chown-r root.
Shell> chown-r Mysql Data
# Next command is optional
Shells> cp support-files/my-medium.cnf/etc/my. cnf
Shell> bin/mysqld_safe -- user = mysql &
# Next command is optional
Shell> cp support-files/mysql. server/etc/init. d/mysql. server
The result is as follows:
Root @ hacker-desktop:/usr/local/mysql # scripts/mysql_install_db -- user = mysql
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:
./Bin/mysqladmin-u root password 'new-password'
./Bin/mysqladmin-u root-h hacker-desktop password 'new-password'
Alternatively you can run:
./Bin/mysql_secure_installation
Which will also give you the option of removing the test
Databases and anonymous user created by default. This is
Stronugly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon:
Cd ..;./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
Cd./mysql-test; perl mysql-test-run.pl
Please report any problems with the./bin/mysqlbug script!
Run bin/mysql_secure_installtion as recommended, including deleting Anonymous logon users, canceling root remote logon, and deleting database (test) because it is used for testing and allows remote logon.
After installation, add/usr/local/mysql/bin to environment and add/usr/local/mysql/lib to/etc/ld. so. conf.
Reset the mysql password:
Log on to your system as the Unix user that the mysqld server runs as (for example, mysql ).
Locate. pid file that contains the server's process ID. the exact location and name of this file depend on your distribution, host name, and configuration. common locations are/var/lib/mysql/,/var/run/mysqld/, and/usr/local/mysql/data /. generally,
The file name has an extension of. pid and begins with eithermysqld or your system's host name.
You can stop the MySQL server by sending a normal kill (not kill-9) to the mysqld process, using the path name of the. pid file in the following command:
Shell> kill 'cat/mysql-data-directory/host_name.pid'
Use backticks (not forward quotation marks) with the cat command. These cause the output of cat to be substituted into the kill command.
Create a text file containing the following statements. Replace the password with the password that you want to use.
UPDATE mysql. user SET Password = PASSWORD ('mynewpass') WHERE User = 'root ';
Flush privileges;
Write the UPDATE and FLUSH statements each on a single line. the UPDATE statement resets the password for all root accounts, and the FLUSH statement tells the server to reload the grant tables into memory so that it notices the password change.
Save the file. for this example, the file will be named/home/me/mysql-init. the file contains the password, so it shoshould not be saved where it can be read by other users. if you are not logged in as mysql (the user the server runs as), make sure that
File has permissions that permit mysql to read it.
Start the MySQL server with the special -- init-file option:
Shell> mysqld_safe -- init-file =/home/me/mysql-init &
The server executes the contents of the file named by the -- init-file option at startup, changing each root account password.
After the server has started successfully, delete/home/me/mysql-init.
Next are apache and php. Install the dependent packages: openssl, libmcrypt, mhash, libiconv, and libxml2.
Friendly reminder: If someone downloads the zlib source code and installs it, it may be possible to restart it .... Panel error. (Why ?!!! It seems unrelated. My system is ubuntu10.04)
Uninstall zlib and run sudo killall gnome-panel. Therefore, do not install zlib. Use the default path when using it.
Openssl:./config threads zilb-dynamic make sudo make install
Libmcrypt:./configure -- enable-dynamic-loading
See any operating system documentation about shared libraries
More information, such as the ld (1) and ld. so (8) manual pages.
/Bin/bash .. /.. /libtool -- mode = install/usr/bin/install-c 'xtea. la ''/usr/local/lib/libmcrypt/xtea. la'
/Usr/bin/install-c. libs/xtea. so/usr/local/lib/libmcrypt/xtea. so
/Usr/bin/install-c. libs/xtea. lai/usr/local/lib/libmcrypt/xtea. la
PATH = "$ PATH:/sbin" ldconfig-n/usr/local/lib/libmcrypt
Libraries have been installed in:
/Usr/local/lib/libmcrypt
Problems with mcrypt installation: Add/usr/local/lib/libmcrypt to/etc/ld. so. conf, and run: sudo ldconfig to make it take effect.
Install sun-java6-jre (why use sunjava ?) :
Sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"
Sudo apt-get update
Sudo apt-get install sun-java6-jre sun-java6-plugin
Set the default java: sudo update-alternatives -- config java
JDK can be directly used after download:
Set JAVA_HOME =/usr/local/jdk1.7.0 _ 03
CLASSPATH = $ JAVA_HOME/lib
Add $ JAVA_HOME/BIN in PATH
Apache2.24.1:
LDFLAGS = "-L/usr/local/lib/python2.6/site-packages" CPPFLAGS = "-I/usr/local/include ". /configure -- enable-exception-hook -- enable-load-all-modules -- enable-pie -- enable-modules = most -- enable-so -- enable-file-cache -- enable-cache -- enable-dbd -- enable-echo
-- Enable-buffer -- enable-request -- enable-include -- enable-reflector -- enable-substitute -- enable-sed -- enable-charset-lite -- enable-deflate -- enable-mime-magic -- enable-cern-meta -- enable-expires -- enable-usertrack -- enable-unique-id -- enable-remoteip -- enable-proxy
-- Enable-libmethod-byrequests -- enable-session-cookie -- enable-session-dbd -- enable-ssl -- enable-static-support -- enable-mpms-shared = all -- enable-dav -- enable-asis -- enable-info -- enable-vhost-alias -- enable-negotiation -- enable-imagemap -- enable-actions
-- Enable-speling -- enable-userdir -- enable-rewrite -- with-defined ded-apr -- with-pcre =/usr/local -- with-libxml2 =/usr/local -- with-ssl =/ usr/local/ssl -- with-mpm = worker
Add ServerName localhost: 80 to httpd. conf.
Reference: http://apache.jz123.cn/programs/configure.html
Mycrypt:
LD_LIBRARY_PATH =/usr/local/lib. /configure -- prefix =/usr/local/mcrypt -- with-libiconv-prefix =/usr/local -- with-libmcrypt-prefix =/usr/local
Php5.4:
. /Configure -- prefix =/usr/local/php -- enable-re2c-cgoto -- with-apxs2 =/usr/local/apache2/bin/apxs -- enable-mod-charset -- with-config-file-path =/usr/local/lib -- enable-libgcc -- with-libxml-dir =/usr/local/libxml2 -- with-openssl =/usr/local/ssl -- with-pcre- regex =/usr/local
-- With-zlib-dir -- with-bz2 =/usr/local -- enable-calendar -- enable-exif -- with-pcre-dir =/usr/local -- enable-ftp -- with-openssl-dir =/usr/local/ssl -- with-gd -- with-jpeg-dir -- with-png-dir -- with-freetype-dir -- enable-gd- native-ttf -- enable-gd-jis-conv
-- With-gettext -- With-mhash =/usr/local -- enable-mbstring -- With-mcrypt =/usr/local -- With-mysql =/usr/local/MySQL --- mysql-sock -- With-mysqli =/usr/local/MySQL/bin/mysql_config -- With-PDO-mysql =/usr/local/MySQL -- enable-sockets -- With-iconv- dir =/usr/local
-- Enable-zip -- With-pear =/usr/local/PHP/pear -- enable-Zend-signals -- enable-shmop -- enable-soap -- enable-mysqlnd -- enable-wddx -- enable-sysvmsg -- enable-sysvsem -- enable-sysvshm
Sudo ../bin/PHP Pyrus. phar
Sudo ../bin/PHP go-phar.phar
You may need to manually modify httpd. conf to add the following information for Apache to work with PHP (apache2/CONF /):
Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP-source. PHPs
Loadmodule PHP 5_module modules/libphp5.so
However, it is automatically added after PHP is installed.
Note: first copy Pyrus. phar to/usr/local/PHP/pear (specify the target, otherwise copy it to the pear directory under the source code ). If pear is not installed, it needs to be addressed with a go-pear.phar (http://pear.php.net/go-pear.phar)
After installation, a php. ini file is required under the/usr/local/lib directory. Two versions are available in the source code directory:
Php. ini-development is suitable for development programs (for testing)
Php. ini-production has a high security setting, which is suitable for online product use.
Cp-v php. ini-{d *, p *}/usr/lib/php. ini
Modify php. ini-production to php. ini to ensure that the test environment (local) is consistent with the official environment (online ).
ZendStudio registration code:
Bytes
Create shortcuts:
[Desktop Entry]
Comment = PHP Developing
Name = ZendStudio
Exec =/usr/local/ZendStudio
Encoding = UTF-8
Terminal = false
Type = Application
Categories = Application; Development
Icon =/usr/local/ZendStudio/icon. xpm
Set the permission to Executable
Zend Studio is available directly after being downloaded. If you want to see the Eclipse option in the menu bar, you can write the following file:
$ Gedit ~ /. Local/share/applications/eclipse-user.desktop
[Desktop Entry]
Comment = PHP developer
Name = Zend Studio
Exec =/usr/local/ZendStudio
Encoding = UTF-8
Terminal = false
Type = Application
Categories = Application; Development;
Icon =/usr/local/ZendStudio/icon. xpm
Run the following command to create an xpm image file: convert Icon.png Icon. xpm
The shell can be called directly to create a script:
#! /Bin/bash
/Usr/local/ZendStudio