Recommended Posts

it looks u have gone far and deep into the jungles of freebsd server setyp

you have no idea how hard it is for a freebsd newbie. Every document you read is different from the previous one.

run export DIR=/usr/jails/ip.address

then download makejail.sh.txt script [rename to makejail.sh]

Then the following will take you all the way to setting up apache

:: Removing a jail ::

cd into the jail folder (usually /usr/jails/<ip.address>

chflags -R noschg * && rm -rf *

then cd .. && rmdir jail

:: Starting the Jail installation ::

export DIR=/usr/jails/ip.address

./makejail.sh

YES

cp -R /usr/ports /usr/jails/ip.address/usr/

cp /etc/rc.conf /usr/jails/ip.address/etc/

cp /etc/resolv.conf /usr/jails/ip.address/etc/

add 'jail /usr/jails/ip.address webmatrix /usr/local/bin/bash /etc/rc' to /etc/rc.local

:: entering jail ::

jail /usr/jails/ip.address/ webmatrix ip.address /bin/tcsh

*** webmatrix is the jail's hostname

added the following to /etc/hosts

ip.address hostname

ip.address hostname

ip.address hostname

cd /usr/ports

cd security/ssh2

make -DWITHOUT_X11 install clean

cd /usr/ports/shells/bash2

make install

vi /usr/local/etc/ssh2/sshd_config

- uncomment and edited the following:

PermitRootLogin? ? ? ? ? ? ? ? no

ListenAddress? ? ? ? ? ? ? ? ?  ip.address

touch /etc/fstab

passwd root

*** enter root's password ***

pw user add -n <username> -G wheel -k /etc/skel -s /usr/local/bin/bash -d /home/<username> -m

passwd username

*** enter username's password ***

:: edit /etc/profile ::

alias ls="ls -G"

export PS1="\n\[\e[00m\e[2;32m[\e[0m\e[1;01m\T \e[00m\e[1;32m\u@\h\e[00m\e[2;32m\]:\[\e[00m\e[1;01m\w\e[00m\e[2;32m]\e[00m\n\e[1;32m$\e[0m "

tzsetup

:: exiting jail ::

ps -aux | grep ssh

root? 5698? 0.0? 0.2? 2476 2092? ??? SJ? ? 3:39PM?  0:00.13 /usr/local/sbin/sshd2

root? 5678? 0.0? 0.2? 2332 2020? ??? IsJ?  3:39PM?  0:00.00 /usr/local/sbin/sshd2

kill -HUP 5678

sh /etc/rc.shutdown

kill -15 -1

:: On the main install ::

jail /usr/jails/ip.address webmatrix /usr/local/bin/bash /etc/rc

::SSH into the jail::

cd /usr/ports

make search name=mysql

cd databases/mysql323-server

make install

/usr/local/bin/mysqladmin -u root? password 'new-password'

added /usr/local/etc/rc.d/mysql-server.sh to /etc/rc.conf

cd /usr/ports/www/apache13

make APACHE_PREF_TUNING=YES all install

added apache_enable="YES" to /etc/rc.conf

Hope this helps anyone that might be trying to setup a jail.

The 'man jail' documentation made it look so easy. It tells you to copy /stand/sysinstall to the jail's folder and then run sysinstall. The only thing is that it will error because the jail doesn't have any nameserver setup in the /etc/resolv.conf file. So you will get an error stating that no network is found or something like that.

makejail.sh.txt

  • 2 weeks later...

*EDIT*

Where it reads

:: On the main install ::

jail /usr/jails/ip.address webmatrix /usr/local/bin/bash /etc/rc

it should read instead:

jail /usr/jails/ip.address webmatrix ip.address /bin/sh /etc/rc

If you used the previous command, you will get an error:

jail: Could not make sense of ip-number: /bin/sh
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • What they really need to do is automatically spell "loses" and "lose" correctly since nobody seems to know how to anymore. Then they blame spellcheck/autocomplete and don't realize autocomplete is just filling in the word for them automatically so it was misspelled in the first place.
    • If someone chooses to continue using SB and therefore goes through the manual intervention in the thread, afterwards the BSOD problem is gone. Whether they then re-enable the task doesn't matter, they're done, though on such machines it might pay to keep it disabled in case the next update (if there is a next) causes the same problem. OTOH, if someone disables SB in the BIOS, the problem is also gone. Incidentally, I noticed that this task exists even on machines that don't support SB. It's just installed across the board...and runs. Doing what on such machines is a little hazy.
    • qBittorrent 5.2.2 by Razvan Serea The qBittorrent project aims to provide a Free Software alternative to µtorrent. qBittorrent is an advanced and multi-platform BitTorrent client with a nice user interface as well as a Web UI for remote control and an integrated search engine. qBittorrent aims to meet the needs of most users while using as little CPU and memory as possible. qBittorrent is a truly Open Source project, and as such, anyone can and should contribute to it. qBittorrent features: Polished µTorrent-like User Interface Well-integrated and extensible Search Engine Simultaneous search in most famous BitTorrent search sites Per-category-specific search requests (e.g. Books, Music, Movies) All Bittorrent extensions DHT, Peer Exchange, Full encryption, Magnet/BitComet URIs, ... Remote control through a Web user interface Nearly identical to the regular UI, all in Ajax Advanced control over trackers, peers and torrents Torrents queueing and prioritizing Torrent content selection and prioritizing UPnP / NAT-PMP port forwarding support Available in ~25 languages (Unicode support) Torrent creation tool Advanced RSS support with download filters (inc. regex) Bandwidth scheduler IP Filtering (eMule and PeerGuardian compatible) IPv6 compliant Available on most platforms: Linux, Mac OS X, Windows, OS/2, FreeBSD qBittorrent 5.2.2 changelog: FEATURE: Use D-Bus to show file in file managers (Chocobo1) #24340 BUGFIX: Fix friendlyUnitCompact precision calculation (vafada) #24323 BUGFIX: Remove all top-level folders (glassez) #24333 BUGFIX: Use proper API for checking exit status (Chocobo1) #24349 BUGFIX: Delete stale lockfile when hostname mismatch (TurboTheTurtle, glassez) #24363 BUGFIX: Fix wrong removal procedure of watched folder paths (Chocobo1) #24413 BUGFIX: Don't reannounce before interface changes are applied (glassez) #24447 BUGFIX: Use Latin script for Bosnian locale name (Andy Ye) #24342 WEBUI: Fix performance of global checkbox toggling (tehcneko) #24316 WEBUI: Fix Safari transfer list header misalignment (Piccirello) #24377 WEBUI: Fix error when submitting magnet before metadata loads (Piccirello) #24378 WEBUI: Use correct row id when updating Rss Downloader feed selection (Chocobo1) #24402 WEBUI: Use SameSite=Lax for session cookie to fix cross-site login (Piccirello) #24422 WEBUI: Bring back properties panel expand/collapse button (vafada) #24430 WEBAPI: Only use X-Forwarded-Host header when reverse proxy support is enabled (Chocobo1) #24457 RSSS: Fix "RSS Smart Episode Filter" RegEx (nathanon-akk, glassez) #24398 RSS: Fix previously matched episode format (glassez) #24452 WINDOWS: Fix Python fallback search path (TurboTheTurtle) #24325 WINDOWS: NSIS: Allow to install x64 binary on ARM64 (Chocobo1) #24358 Download: qBittorrent 5.2.2 | 41.1 MB (Open Source) Download: qBittorrent 64-bit installer (qt6) | 43.6 MB Links: qBittorrent Home page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Weechat. https://weechat.org/
  • Recent Achievements

    • Veteran
      branfont went up a rank
      Veteran
    • Reacting Well
      Almohandis earned a badge
      Reacting Well
    • First Post
      Cosminus earned a badge
      First Post
    • One Year In
      ThatGuyOnline earned a badge
      One Year In
    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      485
    2. 2
      +Edouard
      184
    3. 3
      PsYcHoKiLLa
      126
    4. 4
      Steven P.
      87
    5. 5
      neufuse
      72
  • Tell a friend

    Love Neowin? Tell a friend!