记录我安装linux的web环境的一些问题,及阿里云的服务

14168次浏览

最近空闲的时间,一直在搞阿里云的linux服务器,不得不承认自己是菜鸟。安装好多次都出错!难道是我之前的nodejs和mongodb安装的有问题吗?应该也不会。我的mongodb安装是按照这个步骤来的:http://www.haorooms.com/post/3m ,nodejs是按照这个步骤来的:http://www.haorooms.com/post/2n ,而且都能成功运行! linux配置:http://www.haorooms.com/post/4pz ,应该都是没有问题的。但是我之前的一篇文章也写过,安装EZHTTP的集成安装包之后,node的命令不好用了!害得我不得不退而求其次,安装LAMPP。LAMPP相对不是很安全,但是也可以设置。

我的安装过程如下:

Welcome to the XAMPP Setup Wizard.

----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want 
to install. Click Next when you are ready to continue.

XAMPP Core Files [y/N] : y

XAMPP Developer Files [Y/n] :y

Is the selection above correct? [Y/n]: y

----------------------------------------------------------------------------
Installation Directory

XAMPP will be installed to /opt/lampp
Press [Enter] to continue:

----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.

Do you want to continue? [Y/n]: y

----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.

Installing
0% ______________ 50% ______________ 100%
############[root@iZ28uuyr1giZ opt]#

到上面是自动跳掉了,不知道是不是安装成功了,打开LAMPP的文件,里面东西都是有的,那应该是安装成功了,之后我配置了一下apache和nginx,运行命令让xampp启动

############[root@iZ28uuyr1giZ opt]# sudo /opt/lampp/lampp start
sudo: /opt/lampp/lampp: command not found

这个命令说我not found.

那我按照网上用这个命令,但是出现如下错误:

[root@iZ28uuyr1giZ opt]# sudo /opt/lampp/xampp start
/opt/lampp/xampp: line 69: /opt/lampp/share/xampp/xampplib: No such file or directory
/opt/lampp/xampp: line 426: -s: command not found

打了很多命令都是No such file or directory 或者 command not found 好郁闷!

[root@iZ28uuyr1giZ opt]# /opt/lampp/lampp start
-bash: /opt/lampp/lampp: No such file or directory
[root@iZ28uuyr1giZ opt]# sudo tasksel
sudo: tasksel: command not found
[root@iZ28uuyr1giZ opt]# sudo /opt/lampp/lampp restart
sudo: /opt/lampp/lampp: command not found

问题没有解决!转而去阿里云官网上面,用阿里云的方法安装吧!

阿里云说的也蛮详细的。地址如下:http://help.aliyun.com/view/11108189_13435438.html?spm=5176.7224445.1997283057.7.OOxbVD

安装的时候,出现如下错误:

enter image description here

咨询了一个阿里云维护的工程师,说可能是因为我之前安装的时候,linux进程没有彻底杀掉导致的。

谈谈阿里云的服务

我把上面安装环境出现的问题,提交了一个工单,阿里云的服务人员给了我45元的代金券,让我请阿里云的合作伙伴帮我看看。

通过这点看出,阿里云的服务还真的不错!给个赞,不管能不能解决,看出人家对于我这样的小客户还是蛮关心的!

我用代金券买了服务。阿里云合作伙伴的工程师昨天晚上帮我搭建了阿里云的web环境,但是搭建完成之后,我的mongdb数据库连接不上了,不知道是什么原因!

错误如下:

Starting MongoDB... forked process: 5297
[root@iZ28uuyr1giZ data]# all output going to: /usr/local/mongo/mongodb.log
^C
[root@iZ28uuyr1giZ data]# /usr/local/mongo/bin/mongo
MongoDB shell version: 1.8.1
connecting to: test
Mon Nov 3 21:49:02 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:79
exception: connect failed

昨天晚上搞了半天没有成功!最终还是还原了昨天的快照!

在这里,给阿里云的服务点个赞,同时期待阿里云合作伙伴,帮我找出问题所在!

服务器环境安装成功

阿里云合作伙伴不靠谱。我升级了一下阿里云的安装包,安装成功了!安装包操作具体请看

环境虽然表面上安装成功了,但是刚刚重新回滚了一下快照,貌似mongodb又不能启动了!有时间博客上面所有的环境要重新搭建了!

Tags: linux阿里云心得

相关文章: