使用linux配置工作环境的一些日记

1、在文件./bashrc.sh中加入如下语句就可以在命令行中直接执行start_tomcat 和shutdown_tomcat进行执行和关闭程序
[align=center] alias start_tomcat='/home/david/Applications/apache-tomcat-6.0.20/bin/startup.sh'
alias shutdown_tomcat='/home/david/Applications/apache-tomcat-6.0.20/bin/shutdown.sh'[/align]
也可以通过 startup_tomcat function(){}定义一个复杂的函数进行一系列的操作

2、$JAVAHOME PATH的配置为在/ect/profile中,加入如下代码
export JAVA_HOME=/home/david/Applications/jdk1.6.0_20
export CLASSPATH=$JAVA_HOME/jre/lib
export PATH=$PATH:$JAVA_HOME/bin

3、如果想要让其立即生效可以在当前命令行中写入 source /ect/profile
可以在当前终端立即加载修改后的文件

4、进行对整个目录的某些文件增加权限 chmod u+x ./*.sh 进行增加执行权限

5、linux切换工作平台的快捷方式ctrl+alt+->/<- 和移动窗口到别的平台,使用ctrl+shift+alt+->/<-

6、把现在使用的用户放到sodofile中,如下设置:
在文件 /etc/soduers文件中 vim /etc/sudoers进行设置
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
[color=red] david ALL=(ALL) ALL[/color]
## Allows members of the 'sys' group to run networking, software,

7、Fedora RAR 软件安装
下载RAR 3.71 for Linux这个文件:http://www.rarlab.com/rar/rarlinux-3.7.1.tar.gz
文件大小759K,解压之后大小1.5M
然后:
# cd ~/rar
# make
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib
#
然后就可以打开了。
8、Fedora 配置软件源后要进行更新yum,使用如下命令:
yum makecache
yum check-update
从系统-》管理-》软件更新和添加/删除软件中升级,加装,卸载软件包了。
看自己情况决定是否在终端中全面更新系统,命令是终端中su -然后yum update
9、apache2 的使用, 在fedaro下,当更改apache2的DocumentRoot "/home/david/www" 、
<Directory "/home/david/www"> 和把wordpress放到/home/#{user}目录下时,会出现
Forbidden
You don't have permission to access /wordpress on this server
这时主要时apache2没有访问/home/#{user}目录的权限,因此应该给apache2权限,可以让apache2以#{user}的形式登录,如下配置
# User/Group: The name (or #number) of the user/group to run httpd as.
# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
# . On HPUX you may not be able to use shared memory as nobody, and the
# suggested workaround is to create a user www and use that user.
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
#
[color=red] User david
Group david[/color]
这样的话,就有权限访问了
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值