MySQL + PHP upgrade procedure in old Linux system
When I try to play wordpress 3.3.1 blog with ckeditor-for-wordpress.3.6.2.5 plugin ,they requirement depends package version as below.
MySQL-5.0.95
PHP-5.2.4
But my Linux version CentOS 3.9 that was too old and cann't on-line insall such as packages. So, I determine to manual prepare/complie the requirement packages.
- First, download the MySQL 5.0.95 package "MySQL-5.0.95-1.glibc23.src.rpm" from internet and execute below command.
$rpmbuild –rebuild MySQL-5.0.95-1.glibc23.src.rpm –target=i686
Before install the new MySQL, pre-remove all installed MySQL version first.
$rpm -ihv /usr/src/redhat/RPMS/i686/MySQL-*
$mysql_upgrade
$mysql -u root
mysql>create database wordpress;
mysql>GRANT ALL PRIVILEGES ON wordpress.* TO "admin"@"localhost" IDENTIFIED BY "password";
- The php-5.2.4 depends libxml2-2.6.30, to download libxml2-2.6.30.tar.gz from internet and execute below command
$rpmbuild -tb libxml2-2.6.30.tar.gz
$rpm -Uhv /usr/src/redhat/RPM/i386/libxml*
- Download php-5.2.4.tar.gz and unpackage it and execute below command.
$./configure '–host=i386-redhat-linux' '–build=i386-redhat-linux' '–target=i386-redhat-linux-gnu' '–program-prefix=' '–prefix=/usr' '–exec-prefix=/usr' '–bindir=/usr/bin' '–sbindir=/usr/sbin' '–sysconfdir=/etc' '–datadir=/usr/share' '–includedir=/usr/include' '–libdir=/usr/lib' '–libexecdir=/usr/libexec' '–localstatedir=/var' '–sharedstatedir=/usr/com' '–mandir=/usr/share/man' '–infodir=/usr/share/info' '–cache-file=../config.cache' '–with-config-file-path=/etc' '–with-config-file-scan-dir=/etc/php.d' '–enable-force-cgi-redirect' '–disable-debug' '–disable-rpath' '–enable-inline-optimization' '–with-bz2' '–with-db4=/usr' '–with-curl' '–with-exec-dir=/usr/bin' '–with-freetype-dir=/usr' '–with-gd' '–enable-gd-native-ttf' '–with-ttf' '–with-gettext' '–with-ncurses' '–with-gmp' '–with-iconv' '–with-jpeg-dir=/usr' '–with-openssl' '–with-pspell' '–with-regex=system' '–with-zlib' '–with-layout=GNU' '–enable-bcmath' '–enable-exif' '–enable-ftp' '–enable-magic-quotes' '–enable-safe-mode' '–enable-sockets' '–enable-sysvsem' '–enable-sysvshm' '–enable-discard-path' '–enable-wddx' '–enable-mbregex' '–with-kerberos=/usr/kerberos' '–with-mysql' '–with-unixODBC=shared,/usr' '–enable-shmop' '–enable-calendar' '–with-apxs2filter=/usr/sbin/apxs' '–with-pcre-regex' '–with-pear'
$make
$make install
- Configure http.conf and start httpd service by below command
$vi /etc/httpd/conf/httpd.conf # Check/Add below lines.
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
DirectoryIndex index.html index.html.var index.php
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
Download wordpress 3.3.1 and ckeditor-for-wordpress.3.6.2.5, under /var/www/html to unzip wordpress-3.3.1.zip then change to wordpress/wp-content/plugins/ and unzip ckeditor-for-wordpress.3.6.2.5.
$chown -R apache:apache /var/www/html/wordpress
$chmod -R 775 /var/www/html/wordpress
config.filebrowserBrowseUrl = '/ckfinder/ckfinder.html';
config.filebrowserImageBrowseUrl = '/ckfinder/ckfinder.html?Type=Images';
config.filebrowserFlashBrowseUrl = '/ckfinder/ckfinder.html?Type=Flash';
config.filebrowserUploadUrl = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'; //support upload normal file
config.filebrowserImageUploadUrl = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';//support upload image
config.filebrowserFlashUploadUrl = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';//support upload Flash file
Open you Web browser to http://<server ip>/wordpress/wp-admin/install.php
Below data will need to typing following the wordpress page prompt.
- DB_NAME
- The name of the database you created for WordPress in Step 2 .
- DB_USER
- The username you created for WordPress in Step 2.
- DB_PASSWORD
- The password you chose for the WordPress username in Step 2.
- DB_HOST
- The hostname you determined in Step 2 (usually localhost, but not always; see some possible DB_HOST values). If a port, socket, or pipe is necessary, append a colon (:) and then the relevant information to the hostname.
- DB_CHARSET
- The database character set, normally should not be changed (see Editing wp-config.php).
- DB_COLLATE
- The database collation should normally be left blank (see Editing wp-config.php).