Layer-by-layer analysis of linux Server construction steps

Source: Internet
Author: User
Tags ssh secure shell

When learning about linux servers, you may encounter setup problems. Here we will introduce how to build linux servers. After careful sorting, I will share with you here.

Linux Server Build Environment
Linux AS4 2.6.9

Linux Server build 1:
Install Mysql

Using version Mysql5.1.22-rc.tar.gz
Copy the installation package to the/usr/local directory and run the following command:

Groupadd Mysql
Useradd-g mysql Mysql
Cd Mysql
Scripts/mysql_install_db -- user = Mysql
Chown-R mysql: Mysql.
Cp/usr/local/Mysql/support-files/my-medium.cnf/etc/my. cnf
Cp/usr/local/mysql/support-files/mysql. server/etc/rc. d/init. d/Mysqld
Chmod + x/etc/rc. d/init. d/Mysqld
Ln-s/usr/local/mysql/bin/mysql/usr/sbin/Mysql
Chkconfig -- add Mysqld

Start Mysql
Service Mysqld start
Go to Mysql
Mysql

Linux Server build 2:
Install apache

Version httpd-2.0.61.tar.gz
./Configure -- prefix =/usr/local/apache -- enable-module = so
Make
Make install
Cd/usr/local/apache/bin
./Apachectl start
If the gcc compilation tool is not installed, a prompt will be prompted during installation. You can find it on the CD!

Linux Server construction 3:
Install php

Version php-4.4.7.tar.gz
. /Configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/apache/bin/apxs -- with-config-file-path =/usr/local/lib -- enable-track-vars -- with-xml -- with-mysql =/usr/local/Mysql -- with-mbstring -- enable-mbstring = all
Make
Make install
Note:
-- With-apxs = dir is compiled as an apache module
-- With-config-file-path = dir php. ini directory
-- Enable-track-vars trace variable
-- With-xml support
-- With-mysql = dir Mysql support

Linux Server build 4:
Test Mysql, php, and apache

Cp/php Directory/php. ini-dist/usr/local/lib
Cd/usr/local/lib
Mv php. ini-dist php. ini
Vi php. ini
Modify
Register_globals = On
: Wq
Cd/usr/local/apache/conf
Vi httpd. conf
Find DirectoryIndex index.html
Changed to DirectoryIndex index. php index.html.
Find Options Indexes FollowSymLinks MultiViews
Change to Options FollowSymLinks MultiViews.
Suitable place to join

AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
: Wq
Cd ../bin
Apachectl restart

Cd/usr/local/apache/htdocs
Vi test. php
Phpinfo ();
?>
: Wq

Open IE and enter http: // IP/test. php
If you can see the php test page, it means you're done!

Linux Server build 5:
Install ZEND

Version Zend Optimizer v3.0.gz
./Install. sh
This is very simple. In the installation process, you will be asked to specify the php. ini and apache/bin paths, and you can just adjust them yourself.
Edit php. ini and change the optimization value 15 to 1023 to enable all Optimization threads. Join again
Zend_optimizer.enable_loader = 0
Disable zend optimizer to transparently read and save zend encode encryption. Restart apache.

Install phpmyadmin
PhpMyAdmin v2.10.0.gz

Decompress the package and copy it to the htdocs directory under apache.
Enter http: // localhost/phpmyadmin/index. php

Linux Server build 6:
Install discuzz

Discuz6.0
A. decompress the package first.
B. Upload:
Use ftp to upload and decompress the Discuz file! In step 6, put all the files and directory structures in the directory that can be accessed by web requests. I use SSH Secure Shell Client)
C. Set Directory Permissions
Add the following local file with 777 Permissions

./Templates
./Templates/default
./Templates/default /*.*
./Attachments
./Customavatar
./Forumdata
./Forumdata/cache
./Forumdata/templates

D. Configure database information
Open config. inc. php In the upload File Uploaded to the server
$ Dbhost = 'localhost'; // database server
// Database Server
$ Dbuser = 'dbuser'; // database username
// Database username
$ Dbpw = 'dbpw '; // database password
// Database Password
$ Dbname = 'discuz'; // database name
// Database Name
$ Adminemail = admin @ your.com '"> 'admin @ your.com'; // admin email
// Forum system Email
$ Dbreport = 0; // send db error report? 1 = yes
// Do you want to send a Database Error Report? 0 = No, 1 = Yes

Enter the above information based on actual conditions.

Note: The database does not need to be created in advance. It will be automatically created when the Forum is installed!

E. Execute the installation script.

Enter http: // your domain name/Forum directory/install. php in your browser to complete the final installation.
After the installation is successful, delete the installation script install. php) to avoid re-installation. If you do not delete it, you cannot set it when you enter the background of the Forum.

Note: Generally, the installation location is caused by a lack of compilation software! The above operations have been tested.

  1. Do you know the gcc version of linux?
  2. Linux gcc concepts and Parameters
  3. Full cheats: Overview of the meaning of Linux library files
  4. The Quota command for linux disk Quota is described in detail.
  5. Linux System Management-command for changing passwords in batches chpasswd

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.