深圳银联POS支付系统安装手册(Linux MySQL)
Red Hat Enterprise Linux AS 4安装手册
1. 安装须知
安装前要了解一些电脑硬件配置方面的信息以及在安装Linux前所要了解的一些基础知识。
2. 硬件
主要了解:
硬盘 内存 CDROM SCSI卡 网卡 显卡 显示器。
3. Linux的文件系统
Linux并没有“分区”的概念。也就是说,它不会将文件的存储位置指定为磁盘驱动器C、D、E等。而是利用树状的Ext2/3为文件系统。
Linux的文件系统是采用级层式的树状目录结构,在此结构中的最上层是根目录“/”,然后在此目录下再创建其他的目录。目录的名称可以自定义,但是某特殊的目录名称包含有重要的功能,因此不建议随便更改它们的名称,以免造成系统错误。
4. Linux的硬盘名称
在Linux下所有的硬件都当成文件,供系统存取资料。所以,每个硬件都有自己的名称,在Linux中看成是目录名。 Linux中硬盘名称与Windows下的硬盘名称C:、D:不同,其硬盘的名称如下:
硬盘分区后,每个分区的命名如下:
5. 开始安装Linux
下面依次说明Red Hat Enterprise Linux 4 的安装步骤。放入第一张光盘,会看到以下的安装过程的画面:
按Enter键进入图形模式安装:
检查硬件:
加载启动文件:
检查安装光盘是否完好,可以跳过检查安装光盘:
开始对安装光盘进行检测:
检查第一张安装光盘完毕:
准备安装Linux:
安装前的启动界面:
开始安装的界面:
选择安装过程的语言,选择“简体中文”:
选择键盘布局类型:
硬盘分区,选择手工分区:
按“新建”出现增加启动分区,指定其文件类型、大小以及挂载点:
硬盘分区界面,最佳的选择:swap空间大小是内存大小的2倍:
最后增加“根”分区,指定其文件类型、大小以及挂载点:
分区后的分区列表:
网络配置可选,最佳选择是进入系统配置:
配置网络环境:
不启用防火墙:
取消防火墙后的提示框:
添加附加语言支持:
选择时区:
设置管理员密码:
开始软件选择安装:
选择要安装的各种软件:
检查各软件之间的依赖性:
开始安装软件:
提示安装软件包所需要的安装光盘:
格式化各硬盘分区:
格式化root分区:
把所选择的软件包的映像复制到硬盘:
启动RPM安装工具:
为开始安装做准备:
更换安装光盘:
安装各种软件包,依次插入1、2、3、4张安装光盘:
安装各种软件包:
安装完成后最后更换第一张光盘:
最后配置系统文件:
安装过程完成:
重新启动计算机:
启动画面:
加载启动文件:
图形启动界面:
启动细节:
欢迎界面:
接受许可协议:
时间设置:
显示器设置:
LinuxRed Hat 网络登录设置:
注册服务说明:
新增一个普通用户:
声卡测试:可以不安装~
安装其他的工具软件:
设置完成:
输入想要登录的用户名:
“语言”选项可以选择一种系统的使用的默认语言:
“会话”选项可以选择一种界面风格:
输入所选用户的登录密码:
启动画面:
加载组件:
最后是系统的真正显示界面:
开始菜单:
更改/etc/inittab文件,更改其内容,使其启动后使用文字界面:
重新启动:
命令行登录界面:
成功登录:
到此安装Linux操作系统全部完成~
安装JDK
jdk-1_5_0_10-linux-i586-rpm.bin
[root@design backup]# chmod a+x jdk-1_5_0_10-linux-i586-rpm.bin [root@design backup]# ./jdk-1_5_0_10-linux-i586-rpm.bin
Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT KIT 5.0 ……
For inquiries please contact: Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. (LFI#143333/Form ID#011801)
Do you agree to the above license terms? [yes or no]
Yes
Unpacking...
Checksumming...
0
0
Extracting...
UnZipSFX 5.42 of 14 January 2001, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-1_5_0_10-linux-i586.rpm
Preparing... ########################################### [100%]
1:jdk ########################################### [100%]
Done.
[root@design backup]#
[bosent@design ~]$ java -version
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03) Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing) [bosent@design ~]$
安装数据库(web) /etc/my.cnf
[mysqld]
#Set the default character set.
default-character-set=utf8
wait_timeout=604800
interactive_timeout=604800
lower_case_table_names=1
socket=/var/lib/mysql/mysql.sock
MySQL-client-community-5.1.22-0.rhel4.i386.rpm
[root@design backup]# rpm -ivh MySQL-client-community-5.1.22-0.rhel4.i386.rpm warning: MySQL-client-community-5.1.22-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 Preparing... ########################################### [100%]
1:MySQL-client-community ########################################### [100%] [root@design backup]#
MySQL-server-community-5.1.22-0.rhel4.i386.rpm
[root@design backup]# rpm -ivh MySQL-server-community-5.1.22-0.rhel4.i386.rpm warning: MySQL-server-community-5.1.22-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID
5072e1f5
Preparing... ########################################### [100%]
1:MySQL-server-community ########################################### [100%] PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h design.org password 'new-password'
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
Support MySQL by buying support/licenses at
Notes regarding SELinux on this platform:
The default policy might cause server startup to fail because it is
not allowed to access critical files. In this case, please update your installation.
The default policy might also cause inavailability of SSL related features because the server is not allowed to access /dev/random and /dev/urandom. If this is a problem, please do the following:
1) install selinux-policy-targeted-sources from your OS vendor
2) add the following two lines to /etc/selinux/targeted/src/policy/domains/program/mysqld.te:
allow mysqld_t random_device_t:chr_file read;
allow mysqld_t urandom_device_t:chr_file read;
3) cd to /etc/selinux/targeted/src/policy and issue the following command:
make load
Starting MySQL[ OK ]
Giving mysqld 2 seconds to start
[root@design backup]#
[root@design backup]# mysql -u root mysql
Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3
Server version: 5.1.22-rc-community MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select user, host, password from mysql.user; +------+--------------+--------------+
| user | host | password |
+------+--------------+--------------+
| root | localhost | |
| root | design.org | |
| root | 127.0.0.1 | |
+------+---------------+-------------+
3 rows in set (0.00 sec)
mysql>
mysql> show databases;
+---------------------------+
| Database |
+---------------------------+
| information_schema |
| mysql |
| test |
+---------------------------+
3 rows in set (0.00 sec)
mysql>
mysql> create database bosent_crm;
Query OK, 1 row affected (0.00 sec)
mysql> create database bosent_crm;
Query OK, 1 row affected (0.00 sec)
mysql>
mysql> show databases;
+---------------------------+
| Database |
+---------------------------+
| information_schema |
| bosent_crm |
| mysql |
| test |
+---------------------------+
4rows in set (0.00 sec)
mysql>
mysql> GRANT ALL PRIVILEGES ON bosent_crm.* TO bosent_crm@localhost IDENTIFIED BY
'bosent'_crm;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> select user, host, password from mysql.user;
+------------------+---------------+----------------------------------------------------------------------+ | user | host | password | +------------------+--------------+------------------------------------------------------------------------+ | root | localhost | | | root | design.org | | | root | 127.0.0.1 | | | bosent_crm | localhost | *16A27572653AB94B009F762C255A70B84EA02701 | +------------------+---------------+------------------------------------------------------------------------+ 4 rows in set (0.00 sec)
mysql>
安装数据库(Server)
#> groupadd mysql
#> useradd -g mysql mysql
#> cd /usr/local
#> gunzip < /usr/local/src/mysql-6.0.4a-alpha-linux-i686-glibc23.gz | tar xvf - #> ln -s /usr/local/src/mysql-6.0.4a-alpha-linux-i686-glibc23 /usr/local/mysql #> cd mysql
#> chown -R mysql .
#> chgrp -R mysql .
#> scripts/mysql_install_db --user=mysql
#> chown -R root .
#> chown -R mysql data
#> bin/mysqld_safe --user=mysql &