Amazon Free Server build discuz! Forum process (iii)

Source: Internet
Author: User
Tags mcrypt

Reference article: http://faq.comsenz.com/library/system/env/env_linux.htm

Refer to But do not follow the above article completely, otherwise it is possible to make mistakes.

In particular, do not init 6 reboot, I reboot after the instance failed to start, can only re-create the instance.

1: Download

Under the/USR/LOCAL/SRC directory, execute the following two commands to download the lamp_tools.list and the programs in the list:

wget http://c.sihost.net/lamp_tools.list

Wget-i lamp_tools.list

Download the required program installation package

where CMake 2.8.5 download failed, you need to find the source download.

I did a random search, Pro test available: wget http://down1.chinaunix.net/distfiles/cmake-2.8.5.tar.gz

Before installing CMake, you will need to install the C + + compiler gcc and g++

Yum Install GCC

Yum Install gcc-c++ Libstdc++-devel

2: Installation

Cd/usr/local/src

Tar zxvf cmake-2.8.5.tar.gz
CD cmake-2.8.5/
./configure
Gmake &&gmake Install

Groupadd MySQL
useradd-g MySQL MySQL
Mkdir-p/data/mysql
Chown-r Mysql:mysql/data/mysql
Cd/usr/local/src

Tar zxvf mysql-5.5.28.tar.gz

CD mysql-5.5.28

CMake. -dcmake_install_prefix=/usr/local/comsenz/mysql-dmysql_datadir=/data/mysql-dsysconfdir=/usr/local/comsenz/etc/ -dwith_blackhole_storage_engine=1

If an error occurs with the above command:-could not find Curses (missing:curses_library curses_include_path)

Then: MV CMakeCache.txt CMakeCacheold.txt

Yum Install Ncurses-devel

Make && make install

Compile the support libraries required to install PHP

Cd/usr/local/comsenz/mysql

./scripts/mysql_install_db--user=mysql

CP./support-files/mysql.server/etc/rc.d/init.d/mysqld

chmod 755/etc/rc.d/init.d/mysqld

Chkconfig--add mysqld

Chkconfig--level 3 mysqld on

Edit/etc/rc.d/init.d/mysqld to find

Basedir=
Datadir=

Change into

Basedir=/usr/local/comsenz/mysql
Datadir=/data/mysql

Then create the ETC directory under the Comsenz directory and copy the MySQL configuration file to the directory:

Mkdir-p/usr/local/comsenz/etc

CP./SUPPORT-FILES/MY-HUGE.CNF/USR/LOCAL/COMSENZ/ETC/MY.CNF

Edit config file/usr/local/comsenz/etc/my.cnf, increase in [mysqld] Segment

DataDir =/data/mysql

Wait-timeout = 10

Max_connections = 512

Max_connect_errors = 10000000

Local-infile=0

Modify in [mysqld] section

Max_allowed_packet = 16M

Thread_cache_size = number of CPUs

Add Log-bin Comment

mv/usr/local/comsenz/mysql/data/*/data/mysql

Service mysqld Start

bin/mysqladmin-u root password ' admin999 '

Where admin999 is the root password to be set.

Compile the support libraries required to install PHP

Tar zxvf libiconv-1.14.tar.gz

CD libiconv-1.14/

./configure--prefix=/usr/local

Make && make install

cd/usr/local/src/

Tar zxvf 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/usr/local/src/

Tar zxvf mhash-0.9.9.9.tar.gz

CD mhash-0.9.9.9/

./configure

Make && make install

cd/usr/local/src/

The 64bit system performs the following:

Ln-s/usr/local/lib/libmcrypt.la/usr/lib64/libmcrypt.la

Ln-s/usr/local/lib/libmcrypt.so/usr/lib64/libmcrypt.so

Ln-s/usr/local/lib/libmcrypt.so.4/usr/lib64/libmcrypt.so.4

Ln-s/usr/local/lib/libmcrypt.so.4.4.8/usr/lib64/libmcrypt.so.4.4.8

Ln-s/USR/LOCAL/LIB/LIBMHASH.A/USR/LIB64/LIBMHASH.A

Ln-s/usr/local/lib/libmhash.la/usr/lib64/libmhash.la

Ln-s/usr/local/lib/libmhash.so/usr/lib64/libmhash.so

Ln-s/usr/local/lib/libmhash.so.2/usr/lib64/libmhash.so.2

Ln-s/usr/local/lib/libmhash.so.2.0.1/usr/lib64/libmhash.so.2.0.1

Ln-s/usr/local/bin/libmcrypt-config/usr/bin/libmcrypt-config

Ln-s/usr/local/lib/libiconv.so.2/usr/lib64/libiconv.so.2

Tar zxvf mcrypt-2.6.8.tar.gz

CD mcrypt-2.6.8

/sbin/ldconfig

./configure

Make && make install

Compiling and installing PHP

Cd/usr/local/src

Tar zxvf php-5.2.17.tar.gz

CD php-5.2.17

./configure--PREFIX=/USR/LOCAL/COMSENZ/PHP5--with-config-file-path=/usr/local/comsenz/etc--enable-mbstring-- Enable-ftp--with-gd--with-jpeg-dir=/usr--with-png-dir=/usr--enable-magic-quotes--with-mysql=/usr/local/Comsenz /mysql--with-pear--enable-sockets--with-ttf--with-freetype-dir=/usr--enable-gd-native-ttf--with-zlib-- Enable-sysvsem--enable-exif--enable-sysvshm--with-libxml-dir=/usr--with-apxs2=/usr/local/comsenz/apache/bin/ Apxs--with-iconv=/usr/local/libiconv--with-iconv-dir=/usr/local--with-xmlrpc--enable-xml--enable-shmop-- Enable-zip--with-mhash--with-mcrypt--enable-discard-path--enable-bcmath--enable-inline-optimization--with-curl --with-curlwrappers--enable-mbregex--with-openssl

If the following error occurs:

So Vi/usr/local/comsenz/apache/bin/apxs,

The first line

# !/replace/with/path/to/perl/interpreter-w

Replaced by

# !/usr/bin/perl-w

Amazon Free Server build discuz! Forum process (iii)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.