linux linux系统的安装及使用
一.linux系统中安装vm-tools工具:
步骤:
1.在vmware workstation软件中:虚拟机-安装vmware-tools-状态栏会提示-点击帮助-安装帮助文档操作:
注意:下面这个错误
安装VMware Tools错误提示:
A previous installation of VMware Tools has been detected.
The previous installation was made by the tar installer (version 4).
Keeping the tar4 installer database format.
You have a version of VMware Tools installed. Continuing this install will first uninstall the currently installed version. Do you wish to continue? (yes/no) [yes] 当你选择"yes"后出现如下信息:
Error: Unable to find the binary installation directory(answer BINDIR) in the installer database file "/etc/vmware-tools/locations".
Uninstall failed. Please correct the failure and re run the install.
Execution aborted.
解决方法: 删除/etc/vmware-tools和/usr/lib/vmware-tools全部文件, 用命令:rm -rf 文件夹名, 然后重新安装 VMware Tools
一.linux系统安装:
1.centos安装:
(1).切换用户:
很简单吧!
(2).修改密码:
打开终端:
2.ubuntu安装:
(1).切换用户:
ctrl+alt+f2
想要图形界面的话输startx回车
(2).修改密码:
sudo passwd root
二.linux网络设置:(上网很重要)
1.centos网络设置:
一般centos安装后是可以上网的,但是特殊情况时,使用以下解决方案:
(1).vmware workstation软件设置:编辑-虚拟机网络编辑器-恢复默认设置。动态ip,前提是DHCP开启
(2).静态ip设置方法:
或
(3).桥接模式:
右键虚拟机-设置-网络适配器
(4).查看网络情况:
2.ubuntu网络设置:
三.linux配置ADO.net应用运行环境:
1.centos部署:MONO
(1).更新系统
命令:yum –y update
注意:
错误:Loaded plugins: fastestmirror, refresh-packagekit, security
解决方案:
遇到这种情况有两种做法:
方案一:检查网络,是否可以上网
方案二:网络正常还是用不了yum命令,说明是yum镜像没有了,那么就得下载一个来更新。
在安装完CentOS后一般需要修改yum源,才能够在安装更新rpm包时获得比较理想的速度。国内比较快的有163源、sohu源。这里以163源为例子。
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.backup
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
mv CentOS6-Base-163.repo CentOS-Base.repo
yum clean all
然后再使用yum的更新命令就成功了!
(2).安装 gcc等必备软件:
yum -y install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-devel libX11-devel freetype-devel fontconfig-devel cairo-devel
(3).安装Mono需要的GDI+兼容API的库Libgdiplus
cd /usr/local/src/
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-3.8.tar.gz
tar zxvf libgdiplus-3.8.tar.gz
cd libgdiplus-3.8
./configure --prefix=/usr
make
make install
(4).安装Mono (过程时间比较长,耐心等待)
cd /usr/local/src/
wget http://download.mono-project.com/sources/mono/mono-3.10.0.tar.bz2
tar -jxvf mono-3.10.0.tar.bz2
cd mono-3.10.0
./configure --prefix=/usr
make
make install
(5).查看Mono版本:
mono -V
2.ubuntu部署:MONO
四.linux部署web网站:
1. MONO + Jexus
(1).安装安装Jexus:
cd /usr/local/src/
wget http://www.linuxdot.net/down/jexus-5.6.3.tar.gz
tar -zxvf jexus-5.6.3.tar.gz
cd jexus-5.6.3
sudo ./install
(2).jexus服务:
启动:sudo /usr/jexus/jws start
启动:sudo /usr/jexus/jws stop
启动:sudo /usr/jexus/jws restart
(3).配置防火墙开放80端口:
查看开开放的端口:/etc/init.d/iptables status
开放80端口:/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
保存:/etc/rc.d/init.d/iptables save
浏览网站:http://192.168.0.254
(4).重启网站:
sudo /usr/jexus/jws restart siteName
(5).关闭网站:
sudo /usr/jexus/jws stop siteName
2.Apache+mod_mono、Nginx+FastCgi