Linux 4 AS:

让剩余的空间为交换空间,使其空间是内存的两倍。



装多系统时先装windows ,最后装Linux,因为windows安装时把引导区的东西都清除。


因为练习,避免复杂,选用无防火墙。

时区


自己定制安装








由于使用时出现一些问题。后来我采用了RedHat 6
安装时基本相同,开始时要选“桌面版”。
默认帐户:root
我设置密码:redhat123
虚拟机设置:
单核单芯,通过
单核双芯,出错
二:命令
(1)配置网络地址
1)查看IP
ifconfig -a
2)配置IP
ifconfig eth0 192.168.1.22 netmask 255.255.255.0
rout add default gw 192.168.1.1
ping 192.168.1.1
ping 192.168.1.22
(2)登录工作站
通过windows系统登录工作站(需要telnet包,ftp服务器,proftpd包)
登录格式:telnet hostname or telnet ip-address
(3)文件传输
登录格式:ftp hostname or ftp ip_address
安装linux的ftp服务器--proftpd:
1)安装:
从ftp.proftpd.net下载最新版本的proftpd-1.2.0rc3到Linux服务器上。然后按照如下步骤
进行处理:
[root@ftpd /]# cp proftpd-1.2.0rc3.tar.gz /usr/src/
[root@ftpd /]# cd /usr/src
[root@ftpd src]# tar xvfz proftpd-1.2.0rc3.tar.gz
[root@ftpd src]# cd proftpd-1.2.0rc3
[root@pftd proftpd-1.2.0rc3]# ./configure
[root@pftd proftpd-1.2.0rc3]# make
[root@pftd proftpd-1.2.0rc3]# make install
./configure 时要确认系统已安装gcc的包
2)设置:
到现在为止,你已经完成了proftpd的编译和安装。并且在/usr/local/etc/目录下有一个默 认的proftpd配置文件proftpd.conf。 对于笔者的试验系统RedHat6来说,需要将该配置文件中:
Group nogroup
修改为:
Group nobody
因为redhat系统中nobody用户属于nobody组,而不是nogroup组。也可改为ftp组
若需要将proftpd设置为系统启动时自动启动则通过如下命令拷贝启动文件:
[root@ftpd proftpd-1.2.0rc3]# cp ./contrib/dist/rpm/proftpd.init.d /etc/rc.d/init.d/proftpd
然后修改该脚本的可执行属性:
[root@ftpd /]# chmod +x /etc/rc.d/init.d/proftpd
然后编辑/etc/rc.d/init.d/functions:
修改
export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
为
export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin"
注:若将在运行./cofigure命令时通过--prefix选项指定将proftpd安装在/usr/sbin目! 录下
则不需要修改fuctions文件。
然后运行命令:
[root@ftpd rc3.d]# chkconfig --level 35 proftpd on
则下次系统启动以后,proftpd将自动启动。
3)启动
最后,需要确保系统当前没有ftp服务器在运行:
[root@ftpd /]# netstat -ln
若输出中不包含
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
这样的内容则可以直接启动proftpd,否则需要关闭以前的ftpd服务器。对于一般的缺省
Linux安装来说,则需要通过以下的途径来关闭ftp服务器:
编辑/etc/inetd.conf文件,在
ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
一行前加上#:
#ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
然后:
[root@ftpd ! /]# ps ax|grep inetd
350 ? S 0:00 inetd
得到inetd的进程号 ,重新启动inetd进程:
[root@ftpd /]# kill -HUP 350
然后通过如下命令启动proftpd:
[root@ftpd /]# /etc/rc.d/init.d/proftpd start
4)测试

5)ftp“命令找不到”的话,请到光盘的Packages目录下安装ftp的包

windows端登录:

如果连接不上,请关闭Linux防火墙或更改防火墙设置。
增加一个用户,用于ftp的:
useradd -d /home/ftpuser/ -g ftp ftpuser
(4)远程登录-telnet
1)windows端telnet
windows端登录Linux

为windows增加telnet客户端功能

2)Linux端telnet
检测有没有安装telnet服务端和客户端



安装依赖的xinetd



重启守护程序xinetd:

window端可以登录了:


三.操作
1)上传

1.对于非字符文件要bin(二进制)方式上传,否则文件损坏。
2.上传期间不要按任何建,否则中断后面传送的,也早成文件损坏。
四.安装java应用
(1)JDK
1.采用bin方式上传jdk***.bin,然后移放到/usr/java目录下解压安装
2.使用vi配置/etc/profile 文件,加入以下路径

3.加载修改后的profile
#source /etc/profile
4.查询jdk版本

5.测试

(2)安装tomcat应用服务器
1)配置:
1.解压,移放tomcat文件夹到/usr/java目录下
2.在/etc/profile配置tomcat路径

保存修改,然后加载修改后的配置,
#source /etc/profile
2)启动Tomcat:

测试:

额外配置---添加到系统自启动:
1)把catalina.sh文件添加到/ect/rc.d/init.d/目录下,并改名为tomcat(service的名字)

2)修改tomcat7文件
#vi tomcat7

其中:
chkconfig:2345 88 88
第一段数字2345表示让tomcat在2345这四个级别都自动运行
第二段数字70表示进程启动的优先级
第三段数字30表示进程停止的优先即
chkconfig和description都加在#!/bin/sh之后
(3)安装MySql数据库
1)源码版
配置和编译
1.必须安装好gcc*的包
2.解压,进入目录执行
#mkdir -p /usr/local/mysql/
#mkdir -p /usr/local/mysql/data/ //建立数据库存放的目录
#mkdir -p /usr/local/local/mysql/etc/ //建立数据库配置文件存放目录
#./configure --prefix=/usr/local/mysql
--localstatedir=/usr/local/mysql/data/
--sysconfdir=/usr/local/mysql/etc/
--with-charset=utf8
如出现如下错误:

安装ncurses:


重新执行。
成功编译会显示:

3.编译安装Mysql
编译:make
安装:make install
4.设置文件权限
。。。。。。。。。。
2)二进制版

关键字:glibc23
迅雷下载:
thunder://QUFodHRwOi8vd3d3LnBocGNoaW5hLmNvbS9kb3dubG9hZC9zb2Z0L215c3FsL215c3FsLTUuMS4yMy1yYy1saW51eC1pNjg2LWdsaWJjMjMudGFyLmd6Wlo=
1.增加mysql用户组
groupadd mysql
useradd -g mysql mysql
2.解压二进制包,放到/usr/local/目录下
3.在数据库目录下创建系统数据库表,--user表示这些数据库和表的所有者为此用户
cd mysql
./scripts/mysql_install_db --user=mysql
注意:要在mysql的安装目录,不要进scrips执行命令,否则会出错找不到什么的,因为它里面用了相对路径。
成功:


4.设置目录权限,将data目录的所有者改为mysql,其它目录的文件所有者为root
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/data
注意:Mysql中的root ,是登录管理的账户 和Linux的root是不同的的
5.启动mysql

7.登录Mysql,出现以下即成功了

8.显示熟悉的数据库了

安全设置:
#./bin/mysql_secure_installation
依次是核对密码、设置密码、匿名用户、远程IP登录、测试的数据库、重载权限表。
root的开始密码是空的,我将设置密码为123qwe。移除匿名用户、允许IP远程登录、不移除测试用的数据库、马上重载权限表。
需密码的登录:

这里的root是mysql使用的用户,不是Linux的root
远程登录:
问题:

原因:

添加登录地址:

grant all privileges on "." to ' root'@'%' identified by '123qwe' with grant option;
允许任何远程地址使用用户为root,密码为123qwe,拥有所有权限,来登录操作数据库。
windows的Mysql管理软件登录:


添加到Linux系统自启动:
1.复制
#cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysqld
其中改名为mysqld(service的名字)
2.修改mysqld(由于安装目录使用了默认的,所以不用修改了)

3
执行挂接服务命名:
#chkconfig --add mysqld
挂在完成后,mysql会随开机一起启动服务
查看挂接服务:chkconfig --list
删除挂接服务:chkconfig --del mysqld
启动和停止Mysql服务:
#service mysqld start
#service mysqld stop
分享到:
相关推荐
rethat红帽集群虚拟化详解 红帽_Cluster_Virtualization
这是 retHat5.4 安装gcc 和 g++ 所需要的rpm 包
yum安装软件时This system is not registered with RHN. RHN support will be disabled. 的解决方法 Red Hat Enterprise Linux Server(RHEL) 的yum服务是付费的,因为没有付费,所以无法使用yum安装软件,如RHEL想...
根据提供的文件名"retHat5.4 ░▓╫░gcc ╨Φ╥¬╡─░ⁿ1、retHat5.4 安装gcc 需要的包1",这可能包含了一些必要的依赖项。在RHEL 5.4中,安装GCC通常需要以下这些基本包: 1. `binutils`: 提供了如`as`(汇编器...
清华大学linux学习入门基础课件 这些课件是基于红帽linux操作系统的
在RHEL70环境下部署MongoDB 3.4.7,你需要确保系统满足最低的硬件和软件要求,并且安装相应的依赖库。安装过程中,通常会涉及解压提供的压缩包,配置MongoDB服务,设置数据目录权限,以及启动和配置守护进程`mongod`...
VMware 是一款强大的虚拟化软件,它允许用户在单个计算机上运行多个操作系统,每个操作系统都如同运行在独立的硬件上。VMware 提供了多种版本,包括适用于 Linux、Windows 和 macOS 的版本。在本文中,我们将详细...
在Red Hat 5.4操作系统中,为系统配置中文环境并安装小企鹅输入法是一项常见的任务,特别是在处理中文文档或者需要中文输入的工作场景下。本文将详细介绍如何通过提供的rpm包来解决这个问题。 ...
rhel_4.0_Security_Guide-zh_cn.pdf,rhel_4.2-selinux_guide-en.pdf、rhel_4.5_Reference_Guide.pdf rhel_4.5_Security_Guide.pdf rhel_4.5_System_Administration_Guide.pdf rhel_4_inroduction_sa.pdf ...
- **7.5版本**:此版本继续强化了容器化应用的部署,改进了系统安全性和自动化管理工具。 - **7.7版本**:作为7系列的最新版本,7.7在7.5的基础上提供了更多的安全修复,增强了系统性能,并对即将过期的组件进行了...
在工程名上右击,选择`Build Path`,然后点击`Add Libraries...`,按照向导步骤引入JUnit库,以便在项目中进行单元测试。 **一、配置Struts2** 1. 添加Struts2所需的JAR包。至少需要包括以下六个JAR文件: - `...
在IT领域,虚拟化技术是不可或缺的一部分,而VMware Workstation 9(简称VMware9)是一款广泛应用的桌面级虚拟化软件。它允许用户在同一台物理机器上运行多个独立的操作系统实例,为开发者、测试人员和IT专业人员...
RedHat v9.0 中文安装指南
在RHEV的部署过程中,首先需要安装域控,这涉及创建用户(例如,`redhat1`和`redhat2`,其中`redhat`是管理员),配置服务器管理器,并安装必要的软件如`.NET Framework`。接着,安装RHEL作为RHEV-H主机。在RHEL上,...
着重描述redhat5的安装与配置过程,有自定义安装和手动操作安装
RPM 文件格式名称虽然打上了 RedHat 的标志,但其原始设计理念是开放式的,现在包括 OpenLinux、S.u.S.E. 以及 Turbo Linux 等 Linux 发行版本都有采用,可以算是公认的行业标准。 RPM 的特点是将软件包编译打包...
该文档介绍了uclinux的软件平台搭建(mpc527c,rethat7.3).另外,介绍了busybox的应用程序使用
linux环境下telnet安装包,包含: telnet-client 客户端安装包、telnet-server服务端安装包和xinetd依赖包,本人在linux retHat 32位系统上亲自安装过,若您依旧安装不成功,没关系,在附赠.txt中,打开这个链接,...
Red Hat Linux是由Red Hat公司发行的一个Linux发行包。 Red Hat Linux可算是一个“中年”的Linux发行包,其1.0版本于1994年11月3日发行。虽然其历史不及Slackware般悠久,但比起很多的Linux发行包,Red Hat的历史...