Reference

https://help.ubuntu.com/lts/serverguide/httpd.html



  • sudo apt-get update
  • sudo apt-get install apache2


'Linux' 카테고리의 다른 글

Check HDD with fsck  (0) 2017.03.02
How to capture screen on Ubuntu  (0) 2017.02.02
exports  (0) 2014.06.24
mount shared forlder  (0) 2012.02.03
gvim probleam  (1) 2012.02.03


if condition


Check existing directory


if [ -d temp ]; then

    echo "There is temp directory"

else

   echo "There is no temp directory"

fi


Check existing file


if [ -f .bash_profile ]; then
    echo "You have a .bash_profile. Things are fine."
else
    echo "Yikes! You have no .bash_profile!"
fi


Expression

Description

-d file

True if file is a directory.

-e file

True if file exists.

-f file

True if file exists and is a regular file.

-L file

True if file is a symbolic link.

-r file

True if file is a file readable by you.

-w file

True if file is a file writable by you.

-x file

True if file is a file executable by you.

file1 -nt file2

True if file1 is newer than (according to modification time) file2

file1 -ot file2

True if file1 is older than file2

-z string

True if string is empty.

-n string

True if string is not empty.

string1 = string2

True if string1 equals string2.

string1 != string2

True if string1 does not equal string2.



How to make squashfs

You can use mksquashfs


sudo mksquashfs ./rootfs $OUTPUT_FILE_NAME -root-owned -e .svn

http://manpages.ubuntu.com/manpages/precise/man1/mksquashfs.1.html

How to extract squashfs

You can use unsquashfs


sudo unsquashfs -d /media/location1 /media/location2/file.squashfs
http://manpages.ubuntu.com/manpages/zesty/man1/unsquashfs.1.html