I am trying to install apache on my /home/user1/.app/apache2/ by doing the following instruction during installation.
Apache was successfully installed but i was not able to allocated my httpd by doing 'which httpd'. I have done editing my .bashrc profile with and source .bashrc
export PATH=/home/user1/.app/apache2/bin:$PATH
May i know what's the problem i encounter here? Would be appreciate if anyone can help, I am new to Linux.
Try to add in .bash_profile instead of .bashrc. According to the bash man page, .bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.
What is a login or non-login shell?
When you login (type username and password) via console, either sitting at the machine, or remotely via ssh: .bash_profile is executed to configure your shell before the initial command prompt.
But, if you've already logged into your machine and open a new terminal window (xterm) inside Gnome or KDE, then .bashrc is executed before the window command prompt. .bashrc is also run when you start a new bash instance by typing /bin/bash in a terminal.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.