centos 下安装apache2.4.2+mysql5.5.7+php5.4
apache2.4.2+mysql5.5.7+php5.4 Apache安装 wget http://mirror.bjtu.edu.cn/apache//apr/apr-1.4.6.tar.gzwget http://mirror.bjtu.edu.cn/apache//apr/apr-util-1.4.1.tar.gzwget http://apache.etoak.com//httpd/httpd-2.4.2.tar.gztar zxvf apr-1.4.6.ta
apache2.4.2+mysql5.5.7+php5.4
Apache安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
测试
lynx localhost
远程上不行,通过关闭防火墙
service iptables stop
远程就可以访问了
如果不想关闭防火墙,放开80端口即可。
1 2 3 4 5 6 |
|
Mysql安装
使用rpm方式安装mysql
wget http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-server-5.5.27-1.linux2.6.i386.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-client-5.5.27-1.linux2.6.i386.rpm
安装mysql
rpm –ivh MySQL-server-5.5.27-1.linux2.6.i386.rpm
rpm –ivh MySQL-client-5.5.27-1.linux2.6.i386.rpm
启动mysql
/usr/bin/mysqld_safe &
将mysql服务加入自动启动
查看mysql的运行状态
service mysql status
查看mysql是否在自动启动的列表中
chkconfig –list
如果不再加入
chkconfig –add mysql
php安装
安装一些常用的库
1 2 3 4 5 6 7 8 |
|
修改apache配置
# Make sure there’s only **1** line for each of these 2 directives:
# Use for PHP 4.x:
#LoadModule php4_module modules/libphp4.so
#AddHandler php-script .php
# Use for PHP 5.x:
LoadModule php5_module modules/libphp5.so
AddHandler php5-script .php
# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php
AddType text/html .php
# PHP Syntax Coloring
# (optional but useful for reading PHP source for debugging):
AddType application/x-httpd-php-source phps
httpd.conf中加入php的配置文件
PHPINIDir /etc/php.ini
开起gd库php.ini中加入
extension=curl.so
session.auto_start=1
自动启动apache
vi /etc/rc.d/rc.local
加入
/usr/local/apache2/bin/httpd -f /usr/local/apache2/conf/httpd.conf
声明: 本文 ” centos 下安装apache2.4.2+mysql5.5.7+php5.4” 采用 BY-NC-SA 协议进行授权.
转载请注明本文链接地址: http://blog.ueder.info/934.html

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Methods for using Chinese input in CentOS include: using the fcitx input method: install and enable fcitx, set shortcut keys, press the shortcut keys to switch input methods, and input pinyin to generate candidate words. Use iBus input method: Install and enable iBus, set shortcut keys, press the shortcut keys to switch input methods, and input pinyin to generate candidate words.

To read U disk files in CentOS 7, you need to first connect the U disk and confirm its device name. Then, use the following steps to read the file: Mount the USB flash drive: mount /dev/sdb1 /media/sdb1 (replace "/dev/sdb1" with the actual device name) Browse the USB flash drive file: ls /media/sdb1; cd /media /sdb1/directory; cat file name

There are two ways to enter the root authority of CentOS 7: use the sudo command: enter sudo su - in the terminal and enter the current user password. Log in directly as the root user: Select "Other" on the login screen, enter "root" and the root password. Note: Operate carefully with root privileges, perform tasks with sudo privileges, and change the root password regularly.

Solutions for forgotten CentOS passwords include: Single-user mode: Enter single-user mode and reset the password using passwd root. Rescue Mode: Boot from CentOS Live CD/USB, mount root partition and reset password. Remote access: Use SSH to connect remotely and reset the password with sudo passwd root.

One can use the scp command to securely copy files between network hosts. It uses ssh for data transfer and authentication. Typical syntax is: scpfile1user@host:/path/to/dest/scp -r/path/to/source/user@host:/path/to/dest/scp exclude files I don't think you can when using scp command Filter or exclude files. However, there is a good workaround to exclude the file and copy it securely using ssh. This page explains how to filter or exclude files when copying directories recursively using scp. How to use rsync command to exclude files The syntax is: rsyncav-essh-

CentOS 7 disables root permissions by default. You can enable it by following the following steps: Temporarily enable it: Enter "su root" on the terminal and enter the root password. Permanently enabled: Edit "/etc/ssh/sshd_config", change "PermitRootLogin no" to "yes", and restart the SSH service.

There are several ways to gain root privileges in CentOS 7: 1. Run the command using "su". 2. Use "sudo" to run a single command. 3. Enable the root user and set a password. NOTE: Be cautious when using root privileges as they may damage the system.

There are two ways to perform tasks with root privileges in CentOS: 1) Use the sudo command to temporarily obtain root privileges; 2) Log in directly using the root user password. Extreme caution should be used when using root privileges and it is recommended to only use them when necessary.
